import java.util.Scanner;

public class CharNumber {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        System.out.println("输入一串字符");
        String s=scanner.nextLine();
      int bigcount=0;
      int smallcount=0;
      int numbercount=0;
      int othercount=0;
        for(int i=0;i<s.length();i++){
char c=s.charAt(i);
if(c>='A'&&c<='Z'){
    bigcount++;

}else
if (c>='a'&&c<='z'){
    smallcount++;

}else if (c>='0'&&c<='9'){
    numbercount++;
}
else {
    othercount++;
}
            System.out.println("大写字母个数"+bigcount);
        } System.out.println("小写字母个数"+smallcount);
        System.out.println("数字字母个数"+numbercount);
        System.out.println("其他字母个数"+othercount);
    }
}
